﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WL_Store.DAL;
using WL_Store.Model;

namespace WL_Store.BLL
{
   public  class FeedbackBLL
    {

        FeedbackDAl dal= new FeedbackDAl();
        /// <summary>
        /// 查询所有留言反馈
        /// </summary>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public List<FeedbackModel> GetFeedbacks(FeedbackSearchModel searchModel)
        {
            return dal.GetFeedbacks(searchModel);
        }
        /// <summary>
        /// 查询类型
        /// </summary>
        /// <returns></returns>
        public DataTable GetTypes()
        {
            return dal.GetTypes();
        }
        /// <summary>
        /// 添加反馈信息 返回：true添加成功；返回false：添加失败
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddFeedback(FeedbackModel model)
        {
            return dal.AddFeedback(model);
        }
        /// <summary>
        /// 根据Id删除反馈信息 返回true：删除成功；返回false：删除失败
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public bool DeleteFeedback(int Id)
        {
            return dal.DeleteFeedback(Id);
        }

        /// <summary>
        /// 根据Id查询反馈信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public FeedbackModel GetFeedback(int Id)
        {
            return dal.GetFeedback(Id);

        }

        /// <summary>
        /// 更新反馈信息 返回true：更新成功；返回false：更新失败
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateFeedback(FeedbackModel model)
        {
            return dal.UpdateFeedback(model);
        }
    }
}
